import smtplib
from email.mime.text import MIMEText
def sendEmail(massege):
    _user = "493804781@qq.com"
    _pwd = "dwbsmdte"
    _to = "810223801@qq.com"

    msg = MIMEText(massege)
    msg["Subject"] = "赶集网的求租信息，有点意思了。说个你最需要的信息，我再结合多个网站搞搞。（这个是程序发的邮件）"
    msg["From"] = _user
    msg["To"] = _to

    try:
        s = smtplib.SMTP_SSL("smtp.qq.com", 465)
        s.login(_user, _pwd)
        s.sendmail(_user, _to, msg.as_string())
        s.quit()
        print("Success!")
    except smtplib.SMTPException as e:
        print("Falied,%s") % e

